Use WTF_CPU_UNKNOWN when building for X32
authorAlberto Garcia <berto@igalia.com>
Tue, 16 Dec 2025 14:33:34 +0000 (15:33 +0100)
committerAlberto Garcia <berto@igalia.com>
Tue, 16 Dec 2025 14:33:34 +0000 (15:33 +0100)
Forwarded: no

WebKitGTK doesn't build on X32 even with the JIT disabled.
Treating the CPU as unknown is perhaps a bit severe, but it allows us
to get the build done until someone steps up to maintain this
properly.
===================================================================

Gbp-Pq: Name fix-ftbfs-x32.patch

Source/WTF/wtf/PlatformCPU.h
Source/cmake/WebKitCommon.cmake

index 90ff790ce75840dcbb3e1b6b7b9e57cdf358f79f..2278f6ff0b34d7a15394b324d2c08dfd2c954dd5 100644 (file)
 /* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */
 #if   defined(__x86_64__) \
     || defined(_M_X64)
+#if !defined(__ILP32__)
 #define WTF_CPU_X86_64 1
 #define WTF_CPU_X86_SSE2 1
 #define WTF_CPU_KNOWN 1
 #endif
+#endif
 
 /* CPU(ARM64) */
 #if defined(__arm64__) || defined(__aarch64__)
index 3861c0a4366b5892bfa609586ec5e2d2073fdec8..06949b341137dad3c235567cee417327327e0a38 100644 (file)
@@ -111,6 +111,8 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
         set(WTF_CPU_MIPS64 1)
     elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
         set(WTF_CPU_MIPS 1)
+    elseif (CMAKE_CXX_LIBRARY_ARCHITECTURE STREQUAL "x86_64-linux-gnux32")
+        set(WTF_CPU_UNKNOWN 1)
     elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x64|x86_64|amd64)")
         # FORCE_32BIT is set in the build script when --32-bit is passed
         # on a Linux/intel 64bit host. This allows us to produce 32bit